package vn.fpt.fsoft.entities;

// Generated May 5, 2014 11:06:28 AM by Hibernate Tools 3.4.0.CR1


import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Author:	DuongPV1
 * Entity TypeOfBusiness mapping with table TypeOfBusiness in database
 * 
 * */

@Entity
@Table(name="TypeOfBusiness")
public class TypeOfBusiness implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6661661518662285708L;
	private int businessId;
	private String name;
	private Integer siccode;
	private Set<Organisation> organisations = new HashSet<Organisation>(0);

	public TypeOfBusiness() {
	}

	public TypeOfBusiness(int businessId) {
		this.businessId = businessId;
	}

	public TypeOfBusiness(int businessId, String name, Integer siccode,
			Set<Organisation> organisations) {
		this.businessId = businessId;
		this.name = name;
		this.siccode = siccode;
		this.organisations = organisations;
	}
	@Id
	@GeneratedValue
	@Column(name="BusinessId",nullable=false,unique=true)
	public int getBusinessId() {
		return this.businessId;
	}

	public void setBusinessId(int businessId) {
		this.businessId = businessId;
	}
	@Column(name="Name",nullable=true)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}
	@Column(name="SICCode",nullable=true)
	public Integer getSiccode() {
		return this.siccode;
	}

	public void setSiccode(Integer siccode) {
		this.siccode = siccode;
	}
	@OneToMany(fetch=FetchType.LAZY,mappedBy="typeOfBusiness")
	public Set<Organisation> getOrganisations() {
		return this.organisations;
	}

	public void setOrganisations(Set<Organisation> organisations) {
		this.organisations = organisations;
	}

}
